package com.simple.gateway.center.domian.auth.repository;

import com.simple.gateway.center.domian.auth.bo.GatewayUserBO;
import com.simple.gateway.center.domian.auth.param.BindInterfacesParam;
import com.simple.gateway.center.domian.auth.param.ChangeAuthParam;
import com.simple.gateway.center.domian.auth.param.GatewayUserFullParam;

import java.util.List;

/**
 * 项目: simple-gateway-core
 *
 * 功能描述: 授权仓储层
 *
 * @author: WuChengXing
 *
 * @create: 2023-08-29 22:59
 **/
public interface IAuthRepository {

    /**
     * 注册网关厂商
     *
     * @param gatewayUserBO
     * @return
     */
    Boolean registerUser(GatewayUserBO gatewayUserBO);

    /**
     * 绑定授权接口的信息
     *
     * @param bindInterfacesParam
     * @return
     */
    Boolean bindInterfaces(BindInterfacesParam bindInterfacesParam);

    /**
     * 改变授权信息
     *
     * @param changeAuthParam
     * @return
     */
    Boolean changeAuthInto(ChangeAuthParam changeAuthParam);

    /**
     * 查询用户
     * @param param
     * @return
     */
    List<GatewayUserBO> listGateUser(GatewayUserFullParam param);

    /**
     * 判断用户是否存在
     *
     * @param userKey
     * @return
     */
    Boolean hasUserInSystem(String userKey);

}
